import service from "@/utils/request";

/**
 * 获取账户基础信息
 */
export async function getAccBasic() {
  return await service
    .request({
      method: "get",
      url: "/account/acc_basic"
    })
    .then(response => response.data)
    .catch(error => {
      return Promise.reject(error);
    });
}
/**
 * 创建账户
 */
export async function createAccBasic(data) {
  return await service
    .request({
      method: "post",
      url: "/account/acc_basic",
      data
    })
    .then(response => response.data)
    .catch(error => {
      return Promise.reject(error);
    });
}
/**
 * 账户金额转入转出
 */
export async function postTransferAmount(data) {
  return await service
    .request({
      method: "post",
      url: "/account/acc_trade",
      data
    })
    .then(response => response.data)
    .catch(error => {
      return Promise.reject(error);
    });
}
